package com.shop.shoporder.service.impl;

import com.shop.shoporder.entity.StoreGoods;
import com.shop.shoporder.entity.StoreGoodsInfo;
import com.shop.shoporder.entity.WapStoreGoods;
import com.shop.shoporder.mapper.StoreGoodsMapper;
import com.shop.shoporder.service.StoreGoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("storeGoodsService")
public class StoreGoodsServiceImpl implements StoreGoodsService {

    @Autowired
    StoreGoodsMapper storeGoodsMapper;


    @Override
    public int deleteByPrimaryKey(Integer sgId) {
        return storeGoodsMapper.deleteByPrimaryKey(sgId);
    }

    @Override
    public int insert(StoreGoods record) {
        return storeGoodsMapper.insert(record);
    }

    @Override
    public int insertSelective(StoreGoods record) {
        return storeGoodsMapper.insertSelective(record);
    }

    @Override
    public StoreGoods selectByPrimaryKey(Integer sgId) {
        return storeGoodsMapper.selectByPrimaryKey(sgId);
    }

    @Override
    public int updateByPrimaryKeySelective(StoreGoods record) {
        return storeGoodsMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(StoreGoods record) {
        return storeGoodsMapper.updateByPrimaryKey(record);
    }

    @Override
    public StoreGoodsInfo selectStoreGoods(int userNoId) {
        return storeGoodsMapper.selectStoreGoods(userNoId);
    }

    @Override
    public List<StoreGoods> selectStoreGoodList(int storeId) {
        return storeGoodsMapper.selectStoreGoodList(storeId);
    }

    @Override
    public List<WapStoreGoods> getStoreGoods(int storeId) {
        return storeGoodsMapper.getStoreGoods(storeId);
    }

    @Override
    public int updateStoreGoodsUpState(StoreGoods storeGoods) {
        return storeGoodsMapper.updateStoreGoodsUpState(storeGoods);
    }

    @Override
    public List<WapStoreGoods> getStoreGoodsList(int storeId) {
        return storeGoodsMapper.getStoreGoodsList(storeId);
    }


}
